home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 359 / def / binary.def < prev    next >
Encoding:
Modula Definition  |  1989-01-09  |  2.8 KB  |  76 lines

  1. (*      File name: Binary.def                                   *)
  2. (*      Creation : 7/5/85                                       *)
  3. (*      Function : Read Binary data from a File                 *)
  4. (*      By       : Morris                                       *)
  5. (*                                                              *)
  6. (*
  7. *    Copyright (c) 1985,1986,1987,1988,1989 by
  8. *    ana-systems, Foster City, California.
  9. *    All Rights Reserved.
  10. *     
  11. *    This software is furnished under a license and may be used and copied
  12. *    only  in accordance with  the  terms  of  such  license and  with the
  13. *    inclusion of the above copyright notice.  This software or  any other
  14. *    copies thereof may not be provided or otherwise made available to any
  15. *    other  person.   No title to and ownership of the  software is  herby
  16. *    transferred.
  17. *
  18. *    The information in this software is  subject to change without notice
  19. *    and  should  not be construed as a commitment by ana-systems.   No
  20. *    warranty is implied or expressed.
  21. *
  22. *  SCCID  = "1.2    10/8/86"; 
  23. *)
  24. (*      History of modifcation                                  *)
  25. (*      Date            Who             Why                     *)
  26. (*      9/22/86         Morris          Use BYTE from SYSTEM    *)
  27. (*                                                              *)
  28. DEFINITION MODULE Binary;
  29. FROM Files IMPORT File, FileState;
  30. FROM SYSTEM IMPORT ADDRESS,WORD,BYTE;
  31.  
  32. EXPORT QUALIFIED 
  33.     ReadByte,ReadWord,ReadBlock,ReadBytes,
  34.     WriteByte,WriteWord,WriteBlock,WriteBytes;
  35.  
  36.  
  37.  
  38. PROCEDURE ReadByte(   file : File;
  39.                  VAR  byte : BYTE;
  40.                  VAR state : FileState);
  41.  
  42. PROCEDURE ReadWord(   file : File;
  43.                   VAR word : WORD ;
  44.                  VAR state : FileState);
  45.  
  46. PROCEDURE ReadBlock(  file : File;
  47.                  VAR block : ARRAY OF BYTE;
  48.                  VAR state : FileState);
  49.  
  50. PROCEDURE ReadBytes(  file : File;
  51.                       addr : ADDRESS;
  52.                       bytes : CARDINAL;
  53.              VAR bytesread : CARDINAL;
  54.              VAR     state : FileState);
  55.         (* bytesread returns the actual of byte read and
  56.            the user should do check on the number *)
  57.  
  58. PROCEDURE WriteByte(  file : File;
  59.                       byte : BYTE;
  60.                  VAR state : FileState);
  61.  
  62. PROCEDURE WriteWord(  file : File;
  63.                       word : WORD ;
  64.                  VAR state : FileState);
  65.  
  66. PROCEDURE WriteBlock( file : File;
  67.                  VAR block : ARRAY OF BYTE;
  68.                  VAR state : FileState);
  69.  
  70. PROCEDURE WriteBytes( file : File;
  71.                       addr : ADDRESS;
  72.                      bytes : CARDINAL;
  73.             VAR byteswrite : CARDINAL;
  74.             VAR state      : FileState);
  75. END Binary .
  76.